from enum import Enum
from typing import Callable, List, Dict


class StrategyEnum(Enum):
    peak_and_decline = ("peak_and_decline", "高位峰顶下降")
    three_days_close_not_high = ("three_days_close_not_high", "5天内存在峰值")
    three_days_volume_decrease = ("three_days_volume_decrease", "连续多天成交量减少")
    three_days_volume_decrease = ("three_days_volume_decrease", "连续多天成交量减少")
    three_days_volume_decrease = ("three_days_volume_decrease", "连续多天成交量减少")

    def __init__(
        self,
        strategy_code: str,
        strategy_name: str,
    ):
        self.strategy_code = strategy_code
        self.strategy_name = strategy_name

    @staticmethod
    def get_strategy_list(self) -> List[Dict[str, str]]:
        """
        获取策略枚举中的所有策略信息。
        """
        return [
            {
                "strategy_code": strategy.strategy_code,
                "strategy_name": strategy.strategy_name,
            }
            for strategy in StrategyEnum
        ]

    @staticmethod
    def get_strategy_main(self) -> List["StrategyEnum"]:
        """
        根据单个策略代码获取策略枚举。
        """
        return [
            StrategyEnum.three_days_down,
            StrategyEnum.peak_and_decline,
            StrategyEnum.three_days_volume_decrease,
        ]
